package liu.zhi.peng;

public class demo6{
    public static void main(String[] args) {
        //开三次方
        //向上取整
        //向下取整
        //四舍五入
        //次方
        //绝对值
        //system.exit()
        //system.currenttimemillis()
        //system.arraycopy()
        final double cbrt = Math.cbrt(8);
        System.out.println(Math.cbrt(8));
        final double ceil = Math.ceil(3.4);
        System.out.println(ceil);
        final double floor =Math.floor(3.4);
        System.out.println(floor);
        final long round = Math.round(3.4);
        System.out.println(round);
        final double powed = Math.pow(2, 3);
        System.out.println(powed);
//        System.exit(1);
        final double abs = Math.abs(-3.3);
        System.out.println(abs);
        System.out.println(System.currentTimeMillis());
//        System.arraycopy();
        Student [] stu = new Student[5];
        for(int i=0;i<stu.length;i++){
            stu[i] = new Student("liuzhipeng",19);
//        stu[i].setting("liuzhipeng",19);
        }
        People [] peo = new People[5];
        System.arraycopy(stu,0,peo,0,peo.length);
        for(int i=0;i<peo.length;i++)
        {
            peo[i].getting();
        }
    }
}
class People{
    private String name;
    private int age;
    public People(){
    }
    public People(String name,int age){
        this.name=name;
        this.age=age;
    }
    public void getting(){
        System.out.println(name+"\n"+age);
    }
    public void setting(String name ,int age){
        this.name= name;
        this.age =age;
    }
}

class Student extends People{
    public Student(String name,int age){
        super(name,age);
    }
    public void print(){
        System.out.println("这是子类中新增加的一个方法");
    }
}
